#pragma once
//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
//
// Issued to public domain 2013
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================
class VxConnectId;
class VxKey;
class VxSktBase;
class VxSktConnectSimple;

//! generate connection key from network identity
RCODE GenerateConnectionKey(	VxKey *					poRetKey,	// set this key
								VxConnectId *			poConnectId );	// network identity

//! generate key from net identity and connection data and place int sockets m_oRxKey and initialize its crypto
RCODE GenerateRxConnectionKey(	VxSktBase *			poSkt,			// pointer to VxSktBase
								VxConnectId *		poConnectId );		// network identity

//! generate key from net identity and connection data and place int sockets m_oTxKey and initialize its crypto
RCODE GenerateTxConnectionKey(	VxSktBase *			poSkt,			// pointer to VxSktBase
								VxConnectId *		poConnectId );		// announce packet

//! generate key from net identity and connection data and place int sockets m_oRxKey and initialize its crypto
RCODE GenerateRxConnectionKey(	VxSktConnectSimple *	poSkt,			// pointer to VxSktBase
								VxConnectId *			poConnectId );		// network identity

//! generate key from net identity and connection data and place int sockets m_oTxKey and initialize its crypto
RCODE GenerateTxConnectionKey(	VxSktConnectSimple *	poSkt,			// pointer to VxSktBase
								VxConnectId *			poConnectId );		// announce packet


unsigned char * GetVxSktRandData( int iRandDataIdx );
